<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link type="text/css" href="/css/style.css?version=<?php echo $version?>" rel="stylesheet" />
<link type="text/css" href="/css/index.css?version=<?php echo $version?>" rel="stylesheet" />
<link type="text/css" href="/css/patch_home.css?version=<?php echo $version?>" rel="stylesheet" />
<script language="javascript" src="/js/jquery-1.11.1.min.js?version=<?php echo $version?>"></script>
<title>管理平台首页</title>
</head>
<body>
<style>
table {font-size:12px;border-collapse:collapse}
table td{border:1px solid #CCCCCC;height:30px;padding:5px}
</style>
</head>
<body>
<div class="mG_main">
	<!-- main -->
	<div class="mG_module">
		<div class="mG_menuTab">
			<ul>
				<li <?php if ($type == 1) echo 'class="cur"'?>><a href="?type=1"><span>单图文</span></a></li>
				<li <?php if ($type == 2) echo 'class="cur"'?>><a href="?type=2"><span>多图文</span></a></li>
				<li <?php if ($type == 3) echo 'class="cur"'?>><a href="?type=3"><span>图片</span></a></li>
				<li <?php if ($type == 4) echo 'class="cur"'?>><a href="?type=4"><span>语音</span></a></li>
				<li <?php if ($type == 5) echo 'class="cur"'?>><a href="?type=5"><span>视频</span></a></li>
			</ul>
		</div><br/>
		<div class="user_list">
			<div class="user_list">
				<form name="upform" action="" method="post" enctype="multipart/form-data">
					<input type="hidden" name="id" value="<?php echo isset($mid) ? $mid : ''?>" />
					<input type="hidden" name="type" value="<?php echo $type?>" />
					<?php if ($type == 1 || $type == 2){?>
					<!-- 图文 -->
					<input type="hidden" name="multi_id" value="<?php echo isset($multi_id) ? $multi_id : '0'?>" />
					<table cellspacing="0" cellpadding="0" >
						<tr><td width="80">标题</td><td width="350"><input type="text" name="title" id="title" value="<?php echo isset($material['title']) ? $material['title'] : ''?>" size="50"/></td></tr>
						<tr><td>作者</td><td><input type="text" name="author" id="author" value="<?php echo isset($material['author']) ? $material['author'] : ''?>" />（可选）</td></tr>
						<tr><td>封面</td><td><?php echo !empty($material['cover']) ? '<img alt="封面图片" src="' . $material['cover'] . '" width="300px"><br/>' : ''?><input type="file" name="cover" id="cover" /></td></tr>
						<tr><td>摘要</td><td><textarea name="summary" id="summary" rows="7" cols="70"><?php echo isset($material['summary']) ? $material['summary'] : ''?></textarea></td></tr>
						<tr><td>正文</td><td><textarea name="content" id="content"><?php echo isset($material['content']) ? $material['content'] : ''?></textarea></td></tr>
					</table>
					<script type="text/javascript" src="/ueditor/ueditor.config.js"></script>
		            <script type="text/javascript" src="/ueditor/ueditor.all.min.js"></script>
		            <script type="text/javascript" charset="utf-8" src="/ueditor/lang/zh-cn/zh-cn.js"></script>
		            <script type="text/javascript">
		            	UE.getEditor('content');
		            </script>
					<?php }elseif ($type == 3){?>
					<!-- 图片 -->
					<table cellspacing="0" cellpadding="0" >
						<tr><td width="80">标题</td><td width="350"><input type="text" name="title" id="title" value="<?php echo isset($material['title']) ? $material['title'] : ''?>" size="50"/></td></tr>
						<tr><td>图片</td><td><?php echo !empty($material['picurl']) ? '<img alt="图片" src="' . $material['picurl'] . '"><br/>' : ''?><input type="file" name="picurl" id="picurl" /></td></tr>
					</table>
					<?php }elseif ($type == 4){?>
					<!-- 语音  -->
					<table cellspacing="0" cellpadding="0" >
						<tr><td width="80">标题</td><td width="350"><input type="text" name="title" id="title" value="<?php echo isset($material['title']) ? $material['title'] : ''?>" size="50"/></td></tr>
						<tr><td>语音</td><td><?php echo !empty($material['voiceurl']) ? '<audio src="' . $material['voiceurl'] . '">您的浏览器不支持 audio 标签。</audio><br/>' : ''?><input type="file" name="voiceurl" id="voiceurl" /></td></tr>
					</table>
					<?php }elseif ($type == 5){?>
					<!-- 视频 -->
					<table cellspacing="0" cellpadding="0" >
						<tr><td width="80">标题</td><td width="350"><input type="text" name="title" id="title" value="<?php echo isset($material['title']) ? $material['title'] : ''?>" size="50"/></td></tr>
						<tr><td>简介</td><td><textarea name="summary" id="summary" rows="7" cols="70"><?php echo isset($material['summary']) ? $material['summary'] : ''?></textarea></td></tr>
						<tr><td>视频</td><td><?php echo !empty($material['videourl']) ? '<video src="' . $material['videourl'] . '">您的浏览器不支持 video 标签。</video><br/>' : ''?><input type="file" name="videourl" id="videourl" /></td></tr>
					</table>
					<?php }else {?>
					Error!
					<?php }?>
					<div style="margin-top:10px">
						<input type="submit" value=" 确 定 " />&nbsp;&nbsp;
						<input type="button" onclick="javascript: window.history.back()" value=" 取 消 " />
					</div>
				</form>
			</div>
		</div>
	</div>
	<!-- /main-->
	<div class="clearit"></div>
</div>
</body>
</html>
